home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Deutsche Edition 1
/
Deutsche Edition 1.iso
/
amok
/
amok_lha
/
amok59.lha
/
AmokEd_V1.02b
/
txt
/
EdGlobalVars.mod
< prev
next >
Wrap
Text File
|
1993-08-15
|
10KB
|
295 lines
(*************************************************************************
:Program. EdGlobalVars.mod
:Contents. Global Definitions for AmokEd
:Author. Hartmut Goebel
:Copyright. Copyright © 1990 by Hartmut Goebel
:Language. Oberon
:Translator. Oberon Compiler V2.00
:History. V0.1, 26 Sep 1990 Hartmut Goebel
:History. V1.0, 14 Apr 1991 Hartmut Goebel [hG]
:History. V1.0b 22 Apr 1991 [hG] Window is now 0/0/640/_200_ (NTSC)
:History. V1.0c 28 Apr 1991 [hG] ignorecase now TextHeader.status-Flag
:History. V1.1 28 Apr 1991 [hG] + Config
:History. V1.2 07 Jul 1991 [hG] RECORD -> STRUCT (wg. edL)
:Date. 21 Oct 1991 15:47:14
*************************************************************************)
MODULE EdGlobalVars;
IMPORT
NoGuruRq,
d :Dos,
e :Exec,
eAD:EdApplDefs,
g :Graphics,
I :Intuition,
lst:EdLists, (* leicht abgeänderte Verison meines Lists *)
s :SYSTEM;
CONST
NumArgs* = 3;
MaxToggle* = 256;
ChunkSize* = s.SIZE(e.MemChunk); (* Schrittweite für AllocMem *)
NumPingPongs* = 10;
BlockStackSize* = 5;
FileNameLength* = 64;
MaxInternToggle* = 16; (* Texteigene Toggles *)
MaxLineLength* = s.SIZE(e.STRING);
TYPE
StringPtr* = e.STRPTR;
String* = e.STRING;
LinePtr* = lst.NodePtr;
Line* = STRUCT (node*: lst.Node) (* WICHTIG: Bei Änderungen Offsets *)
string*: StringPtr; (* in FindReplace.asm überprüfen!! *)
len*: INTEGER; (* Länge des allocierten Speichers *)
END;
TextHeaderPtr* = POINTER TO TextHeader;
TextHeader* = STRUCT (node*: lst.Node)
window*: I.WindowPtr;
line*, topLine*: LONGINT;
pos*, topPos*: INTEGER;
lineList*: lst.List;
actLinePtr*, topLinePtr*: LinePtr;
numberOfLines*: LONGINT;
font*: g.TextFontPtr;
dirLock*: d.FileLockPtr;
topEdge*, leftEdge*,
width*, height*: INTEGER; (* Zwischenspeicher f. non-IconMode *)
iconTop*, iconLeft*: INTEGER; (* Position für IconMode *)
toggles*: LONGSET; (* texteigene Toggles *)
status*: LONGSET; (* StatusFlags dieses Textes *)
tabStop*, margin*: INTEGER;
name*: ARRAY FileNameLength OF CHAR;
wTitle*: ARRAY 100 OF CHAR;
propGadget*: I.Gadget;
propInfo*: I.PropInfo; (* für PropGadget *)
ExtPingPong*: eAD.XPingPongPtr;
END;
ComProc* = PROCEDURE;
BlockMark* = STRUCT (mark*: lst.Mark)
SNum*, ENum*: LONGINT;
Owner*: TextHeaderPtr;
END;
Configuration* = STRUCT
edges* : STRUCT
left*, top*,
width*, height*: INTEGER;
END;
screenDepth*: INTEGER;
END;
CONST
(* Berechnung: ((x+c-1) DIV c) * c *)
LineAllocSize* = ((s.SIZE(Line)+ChunkSize)-1) DIV ChunkSize * ChunkSize;
(* TextHeader.status-flags *)
macroWithQuit* = 0;
quit* = 1;
modified* = 2;
wordWrap* = 3;
saveTabs* = 4;
iconMode* = 5;
keepTitle* = 6; (* only for Applications and Rexx-Macros *)
autoIndent* = 7;
insertMode* = 8;
ignoreCase* = 9; (* ignore case for search etc. *)
VAR
Text*: TextHeaderPtr; (* der derzeit aktive Text *)
Arg*: ARRAY NumArgs OF StringPtr;
ArgSet*: SET; (* argument flags *)
LineBuffer*: ARRAY MaxLineLength OF CHAR;
LineBufferLen*: INTEGER; (* _Anzahl_ Zeichen im LineBuffer *)
Status*: LONGSET;
NoScreenUpdate*: INTEGER; (* Used in formatter to disable screen updates *)
Rc*: INTEGER; (* interner Returncode *)
ErrorCode*: INTEGER; (* for Applications notice *)
RecLevel*: INTEGER;
EditList*: lst.List;
RPort*: g.RastPortPtr; (* *)
XSize*, YSize*: INTEGER; (* Werte *)
XTBase*, YTBase*: INTEGER; (* für das *)
XBase*, YBase*: INTEGER; (* aktuelle *)
XPixs*, YPixs*: INTEGER; (* Fenster *)
Columns*, Rows*: INTEGER; (* *)
Mx*,My*: INTEGER;
Particial*: StringPtr;
FindStr*, ReplaceStr*, ScanStr*: StringPtr;
recallBuffer*: StringPtr;
DelLinePtr*: LinePtr;
Toggles*: ARRAY 8 OF LONGSET; (* 256 toggles *)
Block*: BlockMark;
BStack*: ARRAY BlockStackSize OF BlockMark;
BStackCurrDepth*: INTEGER;
TempHeight*, TempWidth*: INTEGER;
Config*: Configuration;
Screen*: I.ScreenPtr;
WBScreenDepth*: INTEGER;
PingPong*: ARRAY NumPingPongs OF STRUCT
txt*: TextHeaderPtr;
line*: LONGINT; (* erst alle LONG, wg. .L-Allign *)
pos*: INTEGER;
END;
MainPort*: e.MsgPortPtr;
MainReq*: e.IOStdReqPtr;
AEdrxPort*: ARRAY 12 OF CHAR; (* "AEd........\0" *)
CtrlC*: BYTE; (* RawKeyCode of Ctrl-C *)
CONST
(* edG.StatusFlags *)
kick20*=0; (* indicates if KickStart 2.0 is available *)
isAppl*=1; (* cmd from Application *)
isRexx*=2; (* cmd from Rexx *)
numLock*=3; (* NumLock on NumPad *)
quitQuit*=4; (* last Window has been closed *)
msgCheck*=5; (* Force message queue check for break *)
cmdFound*=6; (* control for implicit ARexx macro invocation *)
noCursor*=7; (* used in Source only *)
arexxAvail*=8; (* ARexx is installed *)
memoryFail*=9; (* out of Memory *)
breakCheck*=10;
disposeString*=11;
commLineMode*=12;
fileReqAvail*=13; (* ARP or ASL Filereq. available *)
alreadyRedrawn*=15; (* TextSync has Redisplaied Text *)
dontReplyIntuiMsg*=16; (* 'cause Window has been closed *)
multiMode*=17; (* indicates MultireplaceMode *)
(* Texte für den Titel *)
Spaces* = " \o";
unNamed* = "unnamed";
RecTooDeep* = "Recursion too deep!";
CommNotFound* = "Command not found!";
CommandTooComplex* = "Command too complex";
RexxOnlyCommand* = "RexxOnly-Command!!";
UnknownCommand* = "Unknown Command";
BadArgument* = "Bad Argument!";
NoMemory* = " -- NO MEMORY -- ";
Okay* = "Okay";
Cancel* = "Cancel";
Copyright* = "AmokEd V1.02b \251Copyright 1990-91 by hartmut Goebel, All Rights Reserved";
Version* = "AmokEd V1.02b 21 Oct 1991 [hG]";
ErrorMarginOver124* = "Error, Margin > 124";
(* searchTags = "search tags";
tagsError = "tags error";
tagNotFound = "tag not found";
unableToLoadFile = "unable to load file";
dreslibraryNotInstalled = "dres.library not installed";
searchrefs = "search .refs";
ReferenceNotFound = "Reference not found";
searchFile = "search file";
UnableToOpenDmeRefForWrite = "Unable to open t:dme_ref for write";
SearchFailed = "Search failed";
UnableToOpenSubDocument = "Unable to open sub document";
*)
TYPE
BorderVectorType = ARRAY 13 OF g.Point;
CONST
Border3Vectors = BorderVectorType(
0,0, 5,0, 5,5, 3,5, 6,8, 7,8, 10,5,
8,5, 8,0, 14,0, 14,10, 0,10, 0,0);
Border3 = I.Border(
0,-1, (* XY origin relative to container TopLeft *)
1,0,g.jam1, (* front pen, back pen and drawmode *)
13, (* number of XY vectors *)
s.ADR(Border3Vectors), (* pointer to XY vectors *)
NIL); (* next border in list *)
(* arrow down *)
Gadget3 = I.Gadget(
NIL, (* next gadget *)
-15,-18, (* origin XY of hit box relative to window TopLeft *)
16,9, (* hit box width and height *)
{I.gRelBottom,I.gRelRight}, (* gadget flags *)
{I.relVerify,I.gadgImmediate,I.rightBorder}, (* activation flags *)
I.boolGadget, (* gadget type flags *)
s.ADR(Border3), (* gadget border or image to be rendered *)
NIL, (* alternate imagery for selection *)
NIL, (* first IntuiText structure *)
LONGSET{}, (* gadget mutual-exclude long word *)
NIL, (* SpecialInfo structure *)
3, (* user-definable data *)
NIL); (* pointer to user-definable data *)
Border2Vectors = BorderVectorType(
0,0, 14,0, 14,10, 8,10, 8,5, 10,5, 7,2,
6,2, 3,5, 5,5, 5,10, 0,10, 0,0);
Border2 = I.Border(
0,-1, (* XY origin relative to container TopLeft *)
1,0,g.jam1, (* front pen, back pen and drawmode *)
13, (* number of XY vectors *)
s.ADR(Border2Vectors), (* pointer to XY vectors *)
NIL); (* next border in list *)
(* arrow up *)
Gadget2 = I.Gadget(
s.ADR(Gadget3), (* next gadget *)
-15,-28, (* origin XY of hit box relative to window TopLeft *)
16,9, (* hit box width and height *)
{I.gRelBottom,I.gRelRight}, (* gadget flags *)
{I.relVerify,I.gadgImmediate,I.rightBorder}, (* activation flags *)
I.boolGadget, (* gadget type flags *)
s.ADR(Border2), (* gadget border or image to be rendered *)
NIL, (* alternate imagery for selection *)
NIL, (* first IntuiText structure *)
LONGSET{}, (* gadget mutual-exclude long word *)
NIL, (* SpecialInfo structure *)
2, (* user-definable data *)
NIL); (* pointer to user-definable data *)
Gadget1SInfo* = I.PropInfo(
{I.autoKnob,I.freeVert,I.propNewLook}, (* PropInfo flags *)
-1,-1, (* horizontal and vertical pot values *)
-1,-1, (* horizontal and vertical body values *)
0,0,0,0,0,0); (* <- ob das stimmt? *)
Image1 = I.Image(
0,0, (* XY origin relative to container TopLeft *)
7,80, (* Image width and height in pixels *)
0, (* number of bitplanes in Image *)
NIL, (* pointer to ImageData *)
SHORTSET{},SHORTSET{}, (* PlanePick and PlaneOnOff *)
NIL); (* next Image structure *)
(* scroll bar *)
Gadget1* = I.Gadget(
s.ADR(Gadget2), (* next gadget *)
-15,10, (* origin XY of hit box relative to window TopLeft *)
16,-40, (* hit box width and height *)
{I.gadgHBox,I.gadgHImage,I.gRelRight,I.gRelHeight},(* gadget flags *)
{I.relVerify,I.gadgImmediate,I.rightBorder}, (* activation flags *)
I.propGadget, (* gadget type *)
s.ADR(Image1), (* gadget border or image to be rendered *)
NIL, (* alternate imagery for selection *)
NIL, (* first IntuiText structure *)
LONGSET{}, (* gadget mutual-exclude long word *)
s.ADR(Gadget1SInfo), (* SpecialInfo structure *)
1,NIL); (* user-definable data *)
StdWindow* = I.NewWindow(0,0,640,200,0,1,
LONGSET{I.closeWindow,I.newSize,I.rawKey,I.mouseButtons,I.activeWindow,
I.mouseMove,I.menuPick,I.gadgetUp,I.gadgetDown},
LONGSET{I.windowSizing,I.windowDrag,I.windowDepth,I.windowClose,
I.noCareRefresh,I.activate,I.rmbTrap},
NIL,NIL,s.ADR(Copyright),NIL,NIL,125,32,-1,-1,{I.wbenchScreen});
PROCEDURE ExecCmd * {"EdParser.doCommand"} (Buffer: StringPtr);
PROCEDURE BreakOut* {"EdParser.BreakOut"} (VAR ptr,paux: StringPtr): StringPtr;
PROCEDURE SetProp * {"EdGadgets.SetProp"};
PROCEDURE SetPropKnob* {"EdGadgets.SetPropKnob"};
END EdGlobalVars.